class Greeter {
    constructor(message) {
        this.greeting = message;
    }
    greet() {
        alert("my name is tom!");
    }
}
let greeter = new Greeter('world');
greeter.greet();
